<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="previous" href="OptParse.Opt.html">
<link rel="next" href="OptParse.Formatter.html">
<link rel="Up" href="OptParse.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of class methods" rel=Appendix href="index_methods.html">
<link title="Index of classes" rel=Appendix href="index_classes.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Base64" rel="Chapter" href="Base64.html">
<link title="BitSet" rel="Chapter" href="BitSet.html">
<link title="Dllist" rel="Chapter" href="Dllist.html">
<link title="DynArray" rel="Chapter" href="DynArray.html">
<link title="Enum" rel="Chapter" href="Enum.html">
<link title="ExtArray" rel="Chapter" href="ExtArray.html">
<link title="ExtHashtbl" rel="Chapter" href="ExtHashtbl.html">
<link title="ExtLib" rel="Chapter" href="ExtLib.html">
<link title="ExtList" rel="Chapter" href="ExtList.html">
<link title="ExtString" rel="Chapter" href="ExtString.html">
<link title="Global" rel="Chapter" href="Global.html">
<link title="IO" rel="Chapter" href="IO.html">
<link title="OptParse" rel="Chapter" href="OptParse.html">
<link title="Option" rel="Chapter" href="Option.html">
<link title="PMap" rel="Chapter" href="PMap.html">
<link title="RefList" rel="Chapter" href="RefList.html">
<link title="Std" rel="Chapter" href="Std.html">
<link title="UChar" rel="Chapter" href="UChar.html">
<link title="UTF8" rel="Chapter" href="UTF8.html">
<link title="Unzip" rel="Chapter" href="Unzip.html"><link title="Flag options" rel="Section" href="#6_Flagoptions">
<link title="Value options" rel="Section" href="#6_Valueoptions">
<link title="Callback options" rel="Section" href="#6_Callbackoptions">
<link title="Special options" rel="Section" href="#6_Specialoptions">
<title>OptParse.StdOpt</title>
</head>
<body>
<div class="navbar"><a class="pre" href="OptParse.Opt.html" title="OptParse.Opt">Previous</a>
&nbsp;<a class="up" href="OptParse.html" title="OptParse">Up</a>
&nbsp;<a class="post" href="OptParse.Formatter.html" title="OptParse.Formatter">Next</a>
</div>
<h1>Module <a href="type_OptParse.StdOpt.html">OptParse.StdOpt</a></h1>
<pre><span class="keyword">module</span> StdOpt: <code class="code">sig</code> <a href="OptParse.StdOpt.html">..</a> <code class="code">end</code></pre><div class="info">
This module contains various standard options.<br>
</div>
<hr width="100%">
<br>
<h6 id="6_Flagoptions">Flag options</h6><br>
<pre><span id="VALstore_const"><span class="keyword">val</span> store_const</span> : <code class="type">?default:'a -> 'a -> 'a <a href="OptParse.Opt.html#TYPEt">OptParse.Opt.t</a></code></pre><div class="info">
<code class="code">store_const ?default const</code> returns a flag option which
      stores the constant value <code class="code">const</code> when the option is
      encountered on the command line.<br>
</div>
<pre><span id="VALstore_true"><span class="keyword">val</span> store_true</span> : <code class="type">unit -> bool <a href="OptParse.Opt.html#TYPEt">OptParse.Opt.t</a></code></pre><div class="info">
<code class="code">store_true ()</code> returns an option which is set to true when
      it is encountered on the command line. The default value is
      false.<br>
</div>
<pre><span id="VALstore_false"><span class="keyword">val</span> store_false</span> : <code class="type">unit -> bool <a href="OptParse.Opt.html#TYPEt">OptParse.Opt.t</a></code></pre><div class="info">
<code class="code">store_false ()</code> returns an option which is set to false when
      it is encountered on the command line. The default value is
      true.<br>
</div>
<pre><span id="VALcount_option"><span class="keyword">val</span> count_option</span> : <code class="type">?dest:int Pervasives.ref -> ?increment:int -> unit -> int <a href="OptParse.Opt.html#TYPEt">OptParse.Opt.t</a></code></pre><div class="info">
Create a counting option which increments its value each time the
      option is encountered on the command line.<br>
<b>Returns</b> the newly created option.<br>
</div>
<div class="param_info"><code class="code">dest</code> : Reference to the option value. Useful for making
      options like '--quiet' and '--verbose' sharing a single value.</div>
<div class="param_info"><code class="code">increment</code> : Increment to add to the option value each
      time the option is encountered.</div>
<pre><span id="VALincr_option"><span class="keyword">val</span> incr_option</span> : <code class="type">?dest:int Pervasives.ref -> unit -> int <a href="OptParse.Opt.html#TYPEt">OptParse.Opt.t</a></code></pre><div class="info">
Exactly identical to <code class="code">count_option ~dest:dest ~increment:1 ()</code>.<br>
</div>
<pre><span id="VALdecr_option"><span class="keyword">val</span> decr_option</span> : <code class="type">?dest:int Pervasives.ref -> unit -> int <a href="OptParse.Opt.html#TYPEt">OptParse.Opt.t</a></code></pre><div class="info">
Exactly identical to <code class="code">count_option ~dest:dest ~increment:(-1) ()</code>.<br>
</div>
<br>
<h6 id="6_Valueoptions">Value options</h6><br>
<pre><span id="VALint_option"><span class="keyword">val</span> int_option</span> : <code class="type">?default:int -> ?metavar:string -> unit -> int <a href="OptParse.Opt.html#TYPEt">OptParse.Opt.t</a></code></pre><div class="info">
<code class="code">int_option ?default ?metavar ()</code> returns an option which takes
      a single integer argument. If <code class="code">~default</code> is given it is the
      default value returned when the option has not been encountered
      on the command line.<br>
</div>
<pre><span id="VALfloat_option"><span class="keyword">val</span> float_option</span> : <code class="type">?default:float -> ?metavar:string -> unit -> float <a href="OptParse.Opt.html#TYPEt">OptParse.Opt.t</a></code></pre><div class="info">
See <a href="OptParse.StdOpt.html#VALint_option"><code class="code">OptParse.StdOpt.int_option</code></a>.<br>
</div>
<pre><span id="VALstr_option"><span class="keyword">val</span> str_option</span> : <code class="type">?default:string -> ?metavar:string -> unit -> string <a href="OptParse.Opt.html#TYPEt">OptParse.Opt.t</a></code></pre><div class="info">
See <a href="OptParse.StdOpt.html#VALint_option"><code class="code">OptParse.StdOpt.int_option</code></a>.<br>
</div>
<br>
<h6 id="6_Callbackoptions">Callback options</h6><br>
<pre><span id="VALint_callback"><span class="keyword">val</span> int_callback</span> : <code class="type">?metavar:string -> (int -> unit) -> unit <a href="OptParse.Opt.html#TYPEt">OptParse.Opt.t</a></code></pre><div class="info">
<code class="code">int_callback ?metavar f</code> returns an option which takes a single
      integer argument and calls <code class="code">f</code> with that argument when encountered
      on the command line.<br>
</div>
<pre><span id="VALfloat_callback"><span class="keyword">val</span> float_callback</span> : <code class="type">?metavar:string -> (float -> unit) -> unit <a href="OptParse.Opt.html#TYPEt">OptParse.Opt.t</a></code></pre><div class="info">
See <a href="OptParse.StdOpt.html#VALint_callback"><code class="code">OptParse.StdOpt.int_callback</code></a>.<br>
</div>
<pre><span id="VALstr_callback"><span class="keyword">val</span> str_callback</span> : <code class="type">?metavar:string -> (string -> unit) -> unit <a href="OptParse.Opt.html#TYPEt">OptParse.Opt.t</a></code></pre><div class="info">
See <a href="OptParse.StdOpt.html#VALint_callback"><code class="code">OptParse.StdOpt.int_callback</code></a>.<br>
</div>
<br>
<h6 id="6_Specialoptions">Special options</h6><br>
<pre><span id="VALhelp_option"><span class="keyword">val</span> help_option</span> : <code class="type">unit -> 'a <a href="OptParse.Opt.html#TYPEt">OptParse.Opt.t</a></code></pre><div class="info">
<code class="code">help_option ()</code> returns the standard help option which
      displays a usage message and exits the program when encountered
      on the command line.<br>
</div>
<pre><span id="VALversion_option"><span class="keyword">val</span> version_option</span> : <code class="type">(unit -> string) -> 'a <a href="OptParse.Opt.html#TYPEt">OptParse.Opt.t</a></code></pre><div class="info">
<code class="code">version_option f</code> returns the standard version option which
      displays the string returned by <code class="code">f ()</code> (and nothing else) on
      standard output and exits.<br>
</div>
</body></html>